﻿
<!--********************* Part1:Jsp Head *********************-->

<%@ page contentType="text/html;charset=UTF-8"%>  
<%@ include file="/framework/head.jsp"%>

<!--********************* Part2:Java Code *********************-->
<%
	CustomerStaffPageData obj = (CustomerStaffPageData)context.getValue("CustomerStaffPageData");
%>

<!--********************* Part3:JavaScript Code ***************-->
<script language="javascript">

var g_check_items = new Array();
var g_i = 0 ;

g_check_items[g_i++] = new CheckItem("工号","Code",true,true,30,false,0);

g_check_items[g_i++] = new CheckItem("自编码","SelfCode",false,true,20,false,0);

g_check_items[g_i++] = new CheckItem("姓名","Name",true,true,20,false,0);

//g_check_items[g_i++] = new CheckItem("性别","Sex",false,true,2,false,0);

g_check_items[g_i++] = new CheckItem("卡号1","CardNo1",false,true,50,false,0);

g_check_items[g_i++] = new CheckItem("卡号2","CardNo2",false,true,50,false,0);

//g_check_items[g_i++] = new CheckItem("是否可领料","IsDraw",true,true,1,false,0);

//g_check_items[g_i++] = new CheckItem("是否有效","Status",true,true,1,false,0);

g_check_items[g_i++] = new CheckItem("备注","Remark",false,true,500,false,0);

function doSaveAndNew()
{
	if(!CheckInput(g_check_items)) return false;
	SetAction("saveAndNewCustomerStaff");
	frm.submit();
}
function doSave()
{
	if(!CheckInput(g_check_items)) return false;
	SetAction("saveCustomerStaff");
	frm.submit();
}
function doCancel()
{
	SetAction("backListCustomerStaff");
	frm.submit();
}

key_InitDefault();
key_RegSubmitHandler(doSaveAndNew);
</script>

<%=uiBody%>>

<%@ include file="/framework/menu.jsp"%>

<!--********************* Part4:Form  ***************-->

<form id=frm action="<%=Config.getSrv()%>" method="post">
<input type=hidden name="action_code">

<input type=hidden name="Id" value="<%=obj.getId()%>">


<br>

<%=UIManager.addEditHeadTitle("员工信息设置")%>


<!--********************* Part5:Edit Area  ***************-->
<%=uiEditStart%>>
<%
	int key_tab = 1 ;
%>

    <%=uiEditTR%>>
        <%=uiEditHeadTD%> width=250>所属客户：</td>
        <%=uiEditTD%>>
            <%  //=((Customer)context.getSessionValue("CustomerDetail")).getName()
            %>
            <!-- <input type=hidden class="texts"  name="CustomerCode" size=20  value="<%=((Customer)context.getSessionValue("CustomerDetail")).getCode()%>" key_tab="<%=key_tab++%>"> -->
            <%=SelectManager.viewCustomerSelect(con,((Customer)context.getSessionValue("CustomerDetail")).getCode(),"CustomerCode",obj.getCustomerCode(),false,"",SelectManager.SELECT_ALL,"","key_tab="+(key_tab++))%>
        </td>
    </tr>

	<%=uiEditTR%>>
		<%=uiEditHeadTD%> width=250>工号：</td>
		<%=uiEditTD%>>
        <% if (((String)context.getSessionValue("ActionValue")).equals("update")) { %>
            <input type=text class="texts"  name="Code" size=20  value="<%=obj.viewCode(con)%>" key_tab="<%=key_tab++%>" readonly>
        <% } else if (((String)context.getSessionValue("ActionValue")).equals("add")) { %>
			<input type=text class="texts"  name="Code" size=20  value="<%=obj.viewCode(con)%>" key_tab="<%=key_tab++%>"><font color=red>*</font>
        <% } %>
		</td>
	</tr>

	<%=uiEditTR%>>
		<%=uiEditHeadTD%> width=250>自编码：</td>
		<%=uiEditTD%>>
			<input type=text class="texts"  name="SelfCode" size=20  value="<%=obj.viewSelfCode(con)%>" key_tab="<%=key_tab++%>">
		</td>
	</tr>
	
	<%=uiEditTR%>>
		<%=uiEditHeadTD%> width=250>姓名：</td>
		<%=uiEditTD%>>
			<input type=text class="texts"  name="Name" size=20  value="<%=obj.viewName(con)%>" key_tab="<%=key_tab++%>"><font color=red>*</font>
		</td>
	</tr>
	
	<%=uiEditTR%>>
		<%=uiEditHeadTD%> width=250>性别：</td>
		<%=uiEditTD%>>
            <%=SelectManager.viewFOrMRadio("Sex",obj.viewSex(con), "key_tab="+(key_tab++)) %><font color=red>*</font>
		</td>
	</tr>

	<%=uiEditTR%>>
		<%=uiEditHeadTD%> width=250>卡号1：</td>
		<%=uiEditTD%>>
			<input type=text class="texts"  name="CardNo1" size=20  value="<%=obj.viewCardNo1(con)%>" key_tab="<%=key_tab++%>">
		</td>
	</tr>
	
	<%=uiEditTR%>>
		<%=uiEditHeadTD%> width=250>卡号2：</td>
		<%=uiEditTD%>>
			<input type=text class="texts"  name="CardNo2" size=20  value="<%=obj.viewCardNo2(con)%>" key_tab="<%=key_tab++%>">
		</td>
	</tr>
	
	<%=uiEditTR%>>
		<%=uiEditHeadTD%> width=250>是否可领料：</td>
		<%=uiEditTD%>>
			<%=SelectManager.viewYesOrNoRadio("IsDraw",obj.viewIsDraw(con), "key_tab="+(key_tab++)) %>
		</td>
	</tr>
	
    <%=uiEditTR%>>
        <%=uiEditHeadTD%> width=250>有效性：</td>
        <%=uiEditTD%>>
            <%=SelectManager.viewValidOrNoRadio("Status",obj.viewStatus(con), "key_tab="+(key_tab++)) %>
        </td>
    </tr>

	<%=uiEditTR%>>
		<%=uiEditHeadTD%> width=250>备注：</td>
		<%=uiEditTD%>>
			<input type=text class="texts"  name="Remark" size=20  value="<%=obj.viewRemark(con)%>" key_tab="<%=key_tab++%>">
		</td>
	</tr>

<%=uiEditEnd%>

<!--********************* Part6:Action Area  ***************-->
<%=uiCommandStart%>>
	<%=uiCommandTR%>>
   		<%=uiCommandTD%>>                     
			<input type=button class="buttons" value=" 保存&添加 " onclick="doSaveAndNew();return false;">
			<input type=button class="buttons" value="    保存   " onclick="doSave();return false;">
			<input type=button class="buttons" value="    返回   " onclick="doCancel();return false;">
		</td>
	</tr>
<%=uiCommandEnd%>
</form>

<%@ include file="/framework/foot.jsp"%>

<!--
	Author    :Wing
	FileName  :/system/base/CustomerStaffEdit.jsp
-->
